#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = unsigned long long;
using pii = pair < int, int >;
using pll = pair < ll, ll >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 2e5 + 10;

int n, m, u[N], v[N];
ll A, B, C, S0, S1, S2, S3, S4;

ll psum(ll x) { return x < 0 ? 0 : x * (x + 1) / 2; }

int rt[N];

pll operator + (pll a, pll b) { return pll(a.fi + b.fi, a.se + b.se); }

namespace seg {
	const int N = 1e7 + 10;
	pll v[N];
	int ch[N][2], ndn;
	void pu(int x) { v[x] = v[ch[x][0]] + v[ch[x][1]]; }
	void upd(int &x, int pos, int l = 0, int r = n - 1) {
		if(!x) x = ++ndn; if(l == r) return v[x].fi++, v[x].se += pos, void(); int mid = l + r >> 1;
		if(pos <= mid) upd(ch[x][0], pos, l, mid); else upd(ch[x][1], pos, mid + 1, r); pu(x);
	}
	pll query(int x, int xl, int xr, int l = 0, int r = n - 1) {
		if(!x || xl > xr) return { 0, 0 }; if(xl == l && xr == r) return v[x]; int mid = l + r >> 1;
		if(xr <= mid) return query(ch[x][0], xl, xr, l, mid); else if(xl > mid) return query(ch[x][1], xl, xr, mid + 1, r);
		else return query(ch[x][0], xl, mid, l, mid) + query(ch[x][1], mid + 1, xr, mid + 1, r);
	}
}

void calc0() {
	rep(i, 0, n - 1) {
		S0 += C * psum(i - 1) * i;
		S0 += B * i * (n - i - 1) * i;
		S0 += A * psum(n - i - 2) * i;
	}
}

void calc1() {
	rep(i, 1, m) {
		int x = u[i], y = v[i];
		S1 += B * x * x + C * x * y + A * psum(x - 1);
		ll t = y - 1 - x, st = psum(y - 1) - psum(x); S1 += A * x * t + B * st + C * y * t;
		S1 += A * x * (n - y - 1) + B * y * (n - y - 1) + C * (psum(n - 1) - psum(y));
	}
}

void calc2() {
	rep(i, 1, m) seg :: upd(rt[u[i]], v[i]), seg :: upd(rt[v[i]], u[i]);
	rep(i, 1, m) {
		ll tS2 = S2;
		int x = u[i], y = v[i]; pll res = seg :: query(rt[x], 0, x - 1) + seg :: query(rt[y], 0, x - 1);
		S2 += B * res.fi * x + C * res.fi * y + A * res.se;
		res = seg :: query(rt[x], x + 1, y - 1) + seg :: query(rt[y], x + 1, y - 1);
		S2 += A * x * res.fi + B * res.se + C * y * res.fi;
		res = seg :: query(rt[x], y + 1, n - 1) + seg :: query(rt[y], y + 1, n - 1);
		S2 += A * x * res.fi + B * y * res.fi + C * res.se;
		if(S2 < tS2) S3++;
	}
}

vec G[N];
int deg[N], id[N], tim, vis[N];

void calc3() {
	rep(i, 1, m) deg[u[i]]++, deg[v[i]]++;
	auto cmp = [](auto a, auto b) { return deg[a] == deg[b] ? a < b : deg[a] < deg[b]; };
	iota(id + 1, id + n + 1, 1); sort(id, id + n, cmp);
	rep(i, 1, m) if(cmp(u[i], v[i])) G[u[i]].eb(v[i]); else G[v[i]].eb(u[i]);
	auto calc = [](auto a, auto b, auto c) { if(a > b) swap(a, b); if(b > c) swap(b, c); if(a > b) swap(a, b); return a * A + b * B + c * C; };
	rep(i, 0, n - 1) {
		int x = id[i]; ++tim;
		for(auto y : G[x]) vis[y] = tim;
		for(auto y : G[x])
			for(auto z : G[y])
				if(vis[z] == tim) S4 += calc(x, y, z);
	}
}

signed main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in, m = in, A = in, B = in, C = in;
	rep(i, 1, m) u[i] = in, v[i] = in, (u[i] > v[i]) && (swap(u[i], v[i]), 0);
	calc0(); calc1(); calc2(); calc3();
	rep(i, 0, 62) S3 = S3 * 2;
	//	cerr << S0 << " " << S1 << " " << S2 << " " << S3 << " " << S4 << endl; 
	ll ans = S0 - S1 + S2 / 2 + S3 - S4; //if(ans == 11938891866248462784ull) cout << S0 << " " << S1 << " " << S2 << " " << S3 << " " << S4 << endl;
	printf("%llu\n", ans);
	return 0;
}
